// BaseMethodPerformer.h: interface for the BaseMethodPerformer class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BASEMETHODPERFORMER_H__0BB549FF_71D5_4372_AC05_FDBF038A026E__INCLUDED_)
#define AFX_BASEMETHODPERFORMER_H__0BB549FF_71D5_4372_AC05_FDBF038A026E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class Packet;
class BaseMethodCallback;

class BaseMethodPerformer  
{
friend class MethodThread;

public:
	BaseMethodPerformer(BaseMethodCallback * pCallback);
	virtual ~BaseMethodPerformer();

public:
  virtual void Cancel() {m_bCancel = true;}
  virtual void * GetpResult() const;

  BaseMethodCallback * GetpCallback() const {return m_pCallback;}
  void SetPerformingData(void * pData, int nDataSize);

protected:
  virtual int Performing();

protected:
  Packet * m_pPacket;
  Packet * m_pResult;
  bool m_bCancel;
  BaseMethodCallback * m_pCallback;
};

#endif // !defined(AFX_BASEMETHODPERFORMER_H__0BB549FF_71D5_4372_AC05_FDBF038A026E__INCLUDED_)
